<template>
  <footer :class="`footer-wrap ${footerPosition}`">
    <el-row class="footer-info">
      <el-col :xs="14" :span="11">
        <div class="title">
          联系我们
        </div>
        <div>深圳市方兴利投资控股有限公司</div>
        <div>联系电话：0755-2798 1268</div>
        <div></div>
        <div>公司地址：广东省深圳市龙华区观湖街道大和路商务大厦A座11楼</div>
      </el-col>
      <el-col :span="6" class="hidden-xs-only"></el-col>
      <el-col :span="7" :xs="10">
        <div class="title ">
          扫码关注
        </div>
        <div>
          <img style="width:100px" src="../assets/img/code_num.png" alt="">
        </div>
      </el-col>
    </el-row>
    <p class="copy"> &copy;2019 深圳市方兴利投资控股有限公司 <span>粤ICP备19028396号-1</span></p>
  </footer>
</template>

<script>
export default {
  name: 'Footer',
  props: {
    msg: String
  },
   data () {
    return {
      footerPosition: 'relative-fxl'
      }
  },
  created() {
    if (this.$route.path == '/') {
      this.footerPosition = "fixed-fxl"
    }
  },
  watch: {
    $route (newV) {
      if (newV.path == '/') {
         this.footerPosition = "fixed-fxl"
      } else {
        this.footerPosition = "relative-fxl"
      }
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="stylus">

  .footer-wrap
    min-height 220px
    background-color #1f252e
    &.relative-fxl
      position relative
      min-height 220px
      background-color #1f252e
    &.fixed-fxl
      position: relative;
      margin-top -46px
      width 100%
      min-height 220px
      background-color #1f252e
    .footer-info
      padding-top 30px
      max-width: 920px;
      width 100%
      margin 0 auto
      font-size 13px
      color #fff
      text-align left
      display: flex;
      div
        line-height 25px
        padding-left: 5px;
      .title
        font-size 16px
        line-height 20px
        margin-bottom 10px

    .copy
      position absolute
      bottom 0px
      left 0
      background-color #131821
      width 100%
      height:30px;
      font-size:13px;
      font-weight:400;
      color:#989898;
      line-height:30px;
      margin 0
      text-align center
  @media (max-width 765px)
    .footer-wrap
      &.fixed-fxl
        position fixed
        bottom 0px
        left 0px
        width 100%
        min-height 220px
        background-color #1f252e
      .footer-info
        text-align center
      .copy
        font-size 12px

</style>
